<template>
	<!-- 半透明遮罩（绝对定位，非根节点） -->
	<view class="mask" @click="close">
		<view class="box" @click.stop>
			用户"{{props.id}}"的地址:  {{props.address}}
		</view>
	</view>
</template>

<script setup>
	import {
		defineProps,
		ref,
		defineEmits
	} from "vue";

	const props = defineProps({
		id: {
			type: String,
			default: '',
		},
		address:{
			type:String,
			default:'暂无'
		}
	});
	const emit = defineEmits(['close'])
	const close = () => {
		emit('close') // 告诉父层隐藏
	}
</script>

<style>
	/* 半透明遮罩 */
	.mask {
		position: fixed;
		left: 0;
		top: 0;
		width: 100%;
		height: 100%;
		background: rgba(128, 128, 128, 0.5);
		z-index: 999;

	}

	/* 内容卡片 */
	.box {
		position: absolute;
		display: flex;
		align-items: center;
		justify-content: center;
		bottom: 0;
		width: 100%;
		height: 200rpx;
		background: #fff;
		border-radius: 24rpx 24rpx 0 0;
	}
</style>